# user/models.py
from datetime import datetime
from django.db import models
from django.contrib.auth.models import Permission,Group,AbstractUser


class UserProfile(AbstractUser):

	gender_choices = (
		('male','男'),
		('female','女'),
	)

	nick_name = models.CharField('昵称',max_length=50,default='')
	birthday = models.DateField('生日',null=True,blank=True,default=datetime.now)
	address = models.CharField("地址", max_length=30, blank=True, null=True)
	gender = models.CharField('性别',max_length=10,choices=gender_choices,default='female')
	mobile = models.CharField('手机号',max_length=11,null=True,blank=True,unique=False)
	image = models.ImageField('头像',upload_to='image/%Y%m',default='image/default.png',max_length=100,null=True,blank=True)
	class Meta:
		verbose_name = '用户信息'
		verbose_name_plural = verbose_name